<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY nbsp "&#x00A0;">
]>
<xsl:stylesheet
	version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:msxml="urn:schemas-microsoft-com:xslt"
	xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:Utils="urn:Utils"
	exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets Utils ">


  <xsl:output method="xml" omit-xml-declaration="yes"/>

  <xsl:param name="currentPage"/>

  <xsl:template match="/">
    <section id="content">
      <div class="container_12">
        <div class="wrapper">
          <article class="grid_8">
            <h2 class="border1">
              <xsl:value-of select="$currentPage/contentTitle"/>
            </h2>
            <div class="page2-box1">
              <span class="link1">
                <xsl:value-of select="$currentPage/personRole"/>
              </span>
              <xsl:if test="$currentPage/contentThumbnail !=''">
                <figure class="page2-img1">
                  <img src="{Utils:GetImageUrl($currentPage/contentThumbnail)}" class="mn_quemSomos_textoPrincipal" alt="" />
                </figure>
              </xsl:if>
              <div class="extra-wrap">
                <p class="p8">
                  <xsl:value-of select ="$currentPage/contentSummary" disable-output-escaping="yes"></xsl:value-of>
                </p>
              </div>
              <br />
              <p>
                <xsl:value-of select ="$currentPage/contentBody" disable-output-escaping="yes"></xsl:value-of>
              </p>
            </div>
          </article>
          <article class="grid_4">
            <xsl:for-each select="$currentPage/parent::List">
              <h2 class="p9 border1">
                <xsl:value-of select="listRelatedTitle"/>
              </h2>
              <xsl:variable name="numberOfMembers" select="listMaxNumberOfRelatedItems"></xsl:variable>
              <xsl:for-each select="./child::PersonPage[@id != $currentPage/@id]">
                <xsl:if test="position()&lt;= $numberOfMembers">
                  <div class="page2-box3">
                    <xsl:if test="contentThumbnail !=''">
                      <figure class="page2-img3">
                        <img src="{Utils:GetImageUrl(contentThumbnail)}" class="mn_quemSomos_membros_foto" alt="" />
                      </figure>
                    </xsl:if>
                    <div class="extra-wrap">
                      <a class="link2" href="{umbraco.library:NiceUrl(@id)}">
                        <xsl:value-of select="contentTitle"/>
                      </a>
                      <p>
                        <xsl:value-of select="personRole"/>
                      </p>
                    </div>
                  </div>
                </xsl:if>
              </xsl:for-each>
              <a class="link3" href="{umbraco.library:NiceUrl(@id)}">Conhecer toda a equipa >></a>
            </xsl:for-each>            
          </article>
        </div>
      </div>
    </section>
  </xsl:template>

</xsl:stylesheet>